package com.barryredmond.javamelibchecker;

public class SupportableJSR {
    public static final Boolean TRUE = new Boolean( true );
    public static final Boolean FALSE = new Boolean( false );
    
    public final String friendlyName;
    
    public final Boolean isSupported;
    
    
    public SupportableJSR( String friendlyName, String uniqueClassToCheck){
        this.friendlyName = friendlyName;
        
        Boolean availableTemp = null;
        try{
            Class.forName( uniqueClassToCheck );
            availableTemp = TRUE;
        }catch( Throwable t ){
            availableTemp = FALSE;
        }
        if( availableTemp==null ){
        	availableTemp = FALSE;
        }
        isSupported = availableTemp;
    }
    
    public SupportableJSR( String friendlyName, Boolean isAvailable ){
        this.friendlyName = friendlyName;
        
        isSupported = isAvailable;
    }
    

}
